package com.eversec.msg.component;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * Created by eversec on 2018/3/2.
 */
@Component
public class Consumer {
    // 使用JmsListener配置消费者监听的队列，其中text是接收到的消息
    @JmsListener(destination = "Q_FM_OMC_EYRJ")
    public void receiveQueue(String text) {
        System.out.println("Consumer收到的报文为:"+text);
    }


    // 使用JmsListener配置消费者监听的队列，其中text是接收到的消息
    @JmsListener(destination = "REPLY_Q_FM_OMC_EYRJ")
    public void receiveReplyQueue(String text) {
        System.out.println("Consumer收到的确认报文为:"+text);
    }
}
